# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataflow.V1b3.Model.ContainerSpec do
  @moduledoc """
  Container Spec.

  ## Attributes

  *   `defaultEnvironment` (*type:* `GoogleApi.Dataflow.V1b3.Model.FlexTemplateRuntimeEnvironment.t`, *default:* `nil`) - Default runtime environment for the job.
  *   `image` (*type:* `String.t`, *default:* `nil`) - Name of the docker container image. E.g., gcr.io/project/some-image
  *   `imageRepositoryCertPath` (*type:* `String.t`, *default:* `nil`) - Cloud Storage path to self-signed certificate of private registry.
  *   `imageRepositoryPasswordSecretId` (*type:* `String.t`, *default:* `nil`) - Secret Manager secret id for password to authenticate to private registry.
  *   `imageRepositoryUsernameSecretId` (*type:* `String.t`, *default:* `nil`) - Secret Manager secret id for username to authenticate to private registry.
  *   `metadata` (*type:* `GoogleApi.Dataflow.V1b3.Model.TemplateMetadata.t`, *default:* `nil`) - Metadata describing a template including description and validation rules.
  *   `sdkInfo` (*type:* `GoogleApi.Dataflow.V1b3.Model.SDKInfo.t`, *default:* `nil`) - Required. SDK info of the Flex Template.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :defaultEnvironment =>
            GoogleApi.Dataflow.V1b3.Model.FlexTemplateRuntimeEnvironment.t() | nil,
          :image => String.t() | nil,
          :imageRepositoryCertPath => String.t() | nil,
          :imageRepositoryPasswordSecretId => String.t() | nil,
          :imageRepositoryUsernameSecretId => String.t() | nil,
          :metadata => GoogleApi.Dataflow.V1b3.Model.TemplateMetadata.t() | nil,
          :sdkInfo => GoogleApi.Dataflow.V1b3.Model.SDKInfo.t() | nil
        }

  field(:defaultEnvironment, as: GoogleApi.Dataflow.V1b3.Model.FlexTemplateRuntimeEnvironment)
  field(:image)
  field(:imageRepositoryCertPath)
  field(:imageRepositoryPasswordSecretId)
  field(:imageRepositoryUsernameSecretId)
  field(:metadata, as: GoogleApi.Dataflow.V1b3.Model.TemplateMetadata)
  field(:sdkInfo, as: GoogleApi.Dataflow.V1b3.Model.SDKInfo)
end

defimpl Poison.Decoder, for: GoogleApi.Dataflow.V1b3.Model.ContainerSpec do
  def decode(value, options) do
    GoogleApi.Dataflow.V1b3.Model.ContainerSpec.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataflow.V1b3.Model.ContainerSpec do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
